# -*- coding: utf-8 -*-
__author__ = 'vladbranzei'



def validate_game(i_game):
    games = ['1512']
    try:
        games.index(i_game)
        return True
    except ValueError as e:
        return False

def validate_scopes(i_scopes):
    my_list = i_scopes.split()
    aux_list = list(my_list)
    scopes = ['auth', 'auth_admin', 'leaderboard', 'message']
    my_scopes = ''
    for scope in my_list:
        try:
            scopes.index(scope)
            my_scopes += scope + ' '
        except ValueError as e:
            aux_list.remove(scope)

    if aux_list:
        return my_scopes.strip()
    else:
        return False





